<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title> 文献医案编辑 </title>
    <link rel="stylesheet" type="text/css" href="/css/style.css" />
    <link rel="stylesheet" type="text/css" href="/css/stars.css" />
    <link rel="stylesheet" type="text/css" href="/css/yianedit.css" />

    <script src="/js/jquery-3.6.0.min.js"></script>
    <script src="/js/jquery-1.10.2.min.js"></script>
    <script src="/js/jquery.form.js"></script>
    <script src="/js/generic.js"></script>
    <script type="text/javascript" src="/js/xlsx.full.min.js"></script>
    <script type="text/javascript" src="/js/EasyUI/jquery.ui.widget.js"></script>
    <script type="text/javascript" src="/js/EasyUI/jquery.iframe-transport.js"></script>
    <script type="text/javascript" src="/js/EasyUI/jquery.fileupload.js"></script>
    <script type="text/javascript" src="/js/EasyUI/jquery.fileupload-process.js"></script>
    <script type="text/javascript" src="/js/EasyUI/jquery.fileupload-validate.js"></script>
    <script type="text/javascript" src="/js/EasyUI/jquery.fileupload-ui.js"></script>
</head>

<body>

<form id="filePost" method="post" enctype="multipart/form-data" onsubmit="return false;">
    <table class="maintable">
        <tr>
            <td class="rightmaintd" valign="top">
                <div class="searchdiv">
                    <a href="/wxya">&lt; 返回</a> &nbsp; &nbsp; &nbsp; &nbsp;
                    <div class="rightsearchdiv"><!-- name --></div>
                </div>

                <div class="searchdiv" id="trPreView">
                    <input type="button" value="病例预览" class="xinzengbtn" onclick="preview();">
                    <input type="button" value="word下载" class="xinzengbtn" onclick="downWord();">
                    <input type="button" value="pdf下载" class="xinzengbtn" onclick="downPdf();" style="display: none">
                </div>
                <div>
                    <input type="file" id="imgsInput" multiple>
                    <table border="1" width="500px" style="border-collapse: collapse;" class="cankaoTable">
                        <thead>
                        <tr>
                            <th width="70%">文件名</th>
                            <th width="15%">操作</th>
                            <th width="15%">预览</th>
                            <th class="shownone">占位图片</th>
                        </tr>
                        </thead>
                        <tbody id="fileList">
                        <!-- 这里将显示上传的文件名 -->
                        <tr th:each="file, index : ${cankao}">
                            <td th:text="${file.getName()}"></td>
                            <td>
                                <a href="#"  class="delete-link">删除</a>
                            </td>
                            <td>
                                <a href="#"  class="preview-link">预览</a>
                            </td>
                            <td>
                                <img class="shownone" th:src="@{/loadImages/{fileName}(fileName=${file.getImage()})}"
                                     onerror="this.onerror=null; this.src='/images/zhongyao.png';"> <br />
                            </td>
                        </tr>
                        </tbody>
                    </table>

                    <div id="previewContainer">
                        <img class="previewImage" id="previewImage" src="" alt="预览图片">
                        <button onclick="closePreview()">关闭预览</button>
                    </div>
                </div>
                <table class="leftrighttable" border="0" cellpadding="5">
                    <tr style="border:1px solid black">
                        <td width="14%" class="tdname">医案编号</td>
                        <td width="20%"><input disabled="disabled" type="text" id="biaohao" class="yianinput" maxlength="50" th:value="${yian.getBiaohao()}"></td>

                        <td width="14%" class="tdname">经验方系数 </td>
                        <td width="20%"><input type="text" id="ExperienceCoefficient" class="yianinput" maxlength="50" th:value="${yian.getExperienceCoefficient()}"></td>

                    </tr>
                    <tr>
                        <td valign="top">封面</td>
                        <td>
                            <img  id="img4" alt="" class="zhongyaopic"
                                  th:src="@{/loadImages/{fileName}(fileName=${yian.getFengmian()})}"
                                  onerror="this.onerror=null; this.src='/images/zhongyao.png';">
                            <br />
                            <div class="fileUpload">
                                <span id="spSmallImage4">上传封面</span>
                                <input type="file" id="smallfile4" name="imageCover" class="upload" onchange="previewImageCover()" />
                                <input type="hidden" id="hidSmallPic4" value="" />
                            </div>
                        </td>

                        <td valign="top">版权页</td>
                        <td>

                            <!--     uploadImages是存放图片的目录，在static文件夹下-->
                            <img id="img5" alt="" class="zhongyaopic" th:src="@{/loadImages/{fileName}(fileName=${yian.getDimian()})}"
                                 onerror="this.onerror=null; this.src='/images/zhongyao.png';"> <br />
                            <div class="fileUpload">
                                <span id="spSmallImage5">上传版权页</span>
                                <input type="file" id="smallfile5" name="imageRight" class="upload" onchange="previewImageRight()" />
                                <input type="hidden" id="hidSmallPic5" value="" />
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td width="14%" class="tdname">患者姓名 </td>
                        <td width="20%"><input type="text" id="xingming" class="yianinput"  maxlength="50" th:value="${yian.getXingming()}">
                        </td>
                        <td width="12%" class="tdname">接诊医生 </td>
                        <td width="14%"><input type="text" id="jiuzhenyisheng" class="yianinput"
                                               maxlength="50" th:value="${yian.getJiuzhenyisheng()}"></td>
                        <td width="13%" class="tdname" colspan="1">就诊 </td>
                        <td width="20%" colspan="2">
                            <select id="jiuzhenleixin" style="width:80px;float:left" >
                                <option value="初诊" th:selected="${yian.getJiuzhenleixin()=='初诊'}">初诊</option>
                                <option value="复诊" th:selected="${yian.getJiuzhenleixin()=='复诊'}">复诊</option>
                            </select>
                            <select id="keshi" style="float:left; margin-right:16px;" >
                                <option value="" th:selected="${yian.getKeshi()==''}">请选择</option>
                                <option value="内科" th:selected="${yian.getKeshi()=='内科'}">内科</option>
                                <option value="外科" th:selected="${yian.getKeshi()=='外科'}">外科</option>
                                <option value="儿科" th:selected="${yian.getKeshi()=='儿科'}">儿科</option>
                                <option value="妇科" th:selected="${yian.getKeshi()=='妇科'}">妇科</option>
                                <option value="皮肤科" th:selected="${yian.getKeshi()=='皮肤科'}">皮肤科</option>
                                <option value="五官科" th:selected="${yian.getKeshi()=='五官科'}">五官科</option>
                                <option value="急诊" th:selected="${yian.getKeshi()=='急诊'}">急诊</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td width="13%" class="tdname">性别 </td>
                        <td width="20%">
                            <select id="xingbie" >
                                <option value="男" th:selected="${yian.getXingbie()=='男'}">男</option>
                                <option value="女" th:selected="${yian.getXingbie()=='女'}">女</option>
                            </select>
                            &nbsp; &nbsp;&nbsp; 婚况
                            <select id="hunkuang">
                                <option value="" th:selected="${yian.getHunkuang()==''}">请选择</option>
                                <option value="已婚" th:selected="${yian.getHunkuang()=='已婚'}">已婚</option>
                                <option value="未婚" th:selected="${yian.getHunkuang()=='未婚'}">未婚</option>
                            </select>
                        </td>
                        <td width="12%" class="tdname">药物过敏史 </td>
                        <td width="14%"><input type="text" id="yaowoguominshi" class="yianinput" maxlength="50" th:value="${yian.getYaowoguominshi()}"></td>

                        <td width="14%" class="tdname" colspan="1">
                            就诊时间

                        </td>
                        <td width="20%" colspan="2">
                            <input type="text" id="year" class="yianinput" style="width:30px;" th:value="${yian.getYear()}">
                            年
                            <input type="text" id="month" class="yianinput" style="width:20px;" th:value="${yian.getMonth()}">
                            月
                            <input type="text" id="day" class="yianinput" style="width:20px;" th:value="${yian.getDay()}">
                            日
                            其他
                            <input type="text" id="otherTime" class="yianinput" style="width:100px;" th:value="${yian.getOtherTime()}">
                        </td>
                    </tr>
                    <tr>
                        <td width="13%" class="tdname" >年龄 </td>
                        <td width="20%"><input type="text" id="nianling" class="yianinput" maxlength="50" th:value="${yian.getNianling()}"></td>
                        <td width="12%" class="tdname">发病节气 </td>
                        <td width="14%"><input type="text" id="fabingjieqi" class="yianinput" maxlength="50" th:value="${yian.getFabingjieqi()}"></td>
                        <td width="13%" class="tdname">朝代 </td>
                        <td width="20%">
                            <select id="chaodai" style="width:162px;height:28px;">
                                <option value="" th:selected="${yian.getChaodai()==''}">请选择</option>
                                <option value="1979年后" th:selected="${yian.getChaodai()=='1979年后'}">1979年后</option>
                                <option value="1949-1979年" th:selected="${yian.getChaodai()=='1949-1979年'}">1949-1979年</option>
                                <option value="民国" th:selected="${yian.getChaodai()=='民国'}">民国</option>
                                <option value="清" th:selected="${yian.getChaodai()=='清'}">清</option>
                                <option value="明" th:selected="${yian.getChaodai()=='明'}">明</option>
                                <option value="元" th:selected="${yian.getChaodai()=='元'}">元</option>
                                <option value="宋" th:selected="${yian.getChaodai()=='宋'}">宋</option>
                                <option value="隋唐五代" th:selected="${yian.getChaodai()=='隋唐五代'}">隋唐五代</option>
                                <option value="魏晋南北朝" th:selected="${yian.getChaodai()=='魏晋南北朝'}">魏晋南北朝</option>
                                <option value="汉" th:selected="${yian.getChaodai()=='汉'}">汉</option>
                                <option value="先秦" th:selected="${yian.getChaodai()=='先秦'}">先秦</option>
                                <option value="上古" th:selected="${yian.getChaodai()=='上古'}">上古</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td width="13%" class="tdname">书名</td>
                        <td width="20%">
                            <input type="text" id="shuming" class="textinput_ai" onclick="searchData()" oninput="searchData()" th:value="${yian.getShuming()}">
                            <ul id="searchResults" class="searchResults" style="display: none"></ul>
                        </td>
                        <td width="12%" class="tdname">编者/主编 </td>
                        <td width="14%"><input type="text" id="zuozhe" class="yianinput" maxlength="50" th:value="${yian.getZuozhe()}"></td>
                        <td width="13%" class="tdname">出版社 </td>
                        <td width="20%"><input type="text" id="chubanshe" class="yianinput" maxlength="50" th:value="${yian.getChubanshe()}"></td>
                    </tr>
                    <tr>
                        <td width="13%" class="tdname">版次 </td>
                        <td width="20%"><input type="text" id="banci" class="yianinput" maxlength="50" th:value="${yian.getBanci()}"></td>
                        <td width="12%" class="tdname">出版时间 </td>
                        <td width="14%"><input type="text" id="chubanshijian" class="yianinput" maxlength="50" th:value="${yian.getChubanshijian()}"></td>

                        <td width="13%" class="tdname" colspan="1">起始页</td>
                        <td width="20%" colspan="2">

                            <input type="text" id="yema" class="yianinput" style="width:45px;" th:value="${yian.getYema()}">
                            &nbsp;&nbsp;终止页
                            <input type="text" id="yemaEnd" class="yianinput" style="width:45px;" th:value="${yian.getYemaEnd()}">
                        </td>
                    </tr>
                    <tr>
                        <td width="13%" class="tdname">ISBN </td>
                        <td width="20%"><input type="text" id="isbn" class="yianinput" maxlength="50" th:value="${yian.getIsbn()}"></td>

                    </tr>
                </table>
                <table class="leftrighttable" border="0" cellpadding="5" id="divRecord" style="display: none;"></table>
            </td>
        </tr>
    </table>
</form>
<from th:replace="~{pages/public/edit:: yian_edit}"></from>
</body>

</html>
<script type="text/javascript" src="/yianjs/edit1.js"></script>
<script type="text/javascript" src="/yianjs/edit2.js"></script>
<script type="text/javascript" src="/yianjs/edit3.js"></script>
<script type="text/javascript" src="/yianjs/edit4.js"></script>
<script type="text/javascript" src="/yianjs/edit5.js"></script>


